module.exports = (app) => {
  const { INTEGER, TEXT, DATE } = app.Sequelize
  const ProductDetail = app.model.define('product_detail', {
    id: {
      allowNull: false,
      autoIncrement: true,
      primaryKey: true,
      type: INTEGER
    },
    product_id: {
      type: INTEGER(20).UNSIGNED,
      allowNull: false,
      comment: '产品id'
    },
    title: {
      type: TEXT,
      allowNull: false,
      comment: '产品标题'
    },
    desc: {
      type: TEXT,
      allowNull: false,
      comment: '产品描述'
    },
    content: {
      type: TEXT,
      allowNull: false,
      comment: '产品内容'
    },
    created_at: DATE,
    updated_at: DATE
  })
  return ProductDetail
}
